<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: Lenovo
  Date: 2021/4/27
  Time: 上午 10:18
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html class="x-admin-sm">
<% String path = request.getContextPath()+"/"; %>
<head>
    <base href="<%=path%>">
    <meta charset="UTF-8">
    <title>主要资产</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link rel="stylesheet" href="layui/css/font.css">
    <link rel="stylesheet" href="layui/css/xadmin.css">
    <script src="layui/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="layui/js/xadmin.js"></script>
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body>

<div class="layui-fluid">
    <div class="layui-row layui-col-space15" style="overflow: scroll;">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-body layui-table-body layui-table-main">
                    <table class="layui-table layui-form">
                        <thead>
                        <tr>
                            <th colspan="8" style="font-size: 16px;font-weight: bold;">
                                (一)土地使用权证
                            </th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr align="center">
                            <td width="100">

                            </td>
                            <td colspan="7">
                                <table >
                                    <tr align="center">
                                        <td>
                                            序号
                                        </td>
                                        <td>
                                            权利人
                                        </td>
                                        <td>
                                            土地证号
                                        </td>
                                        <td>
                                            取得方式
                                        </td>
                                        <td>
                                            地址
                                        </td>
                                        <td>
                                            法定用途
                                        </td>
                                        <td>
                                            实际使用情况
                                        </td>
                                        <td>
                                            面积(m2) 
                                        </td>
                                        <td>
                                            使用权期限 
                                        </td>
                                        <td>
                                            有无抵押 
                                        </td>
                                        <td>
                                            有无出租
                                        </td>
                                        <td>
                                            备注
                                        </td>
                                    </tr>
                                    <c:forEach items="${landUse}" var="landuse" varStatus="vs">
                                    <tr align="center">
                                        <td>
                                            ${vs.count}
                                        </td>
                                        <td>
                                            <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="${landuse.landObligee}">
                                        </td>
                                        <td>
                                            <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="${landuse.landNumber}">
                                        </td>
                                        <td>
                                            <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="${landuse.landMethod}">
                                        </td>
                                        <td>
                                            <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="${landuse.landLocation}">
                                        </td>
                                        <td>
                                            <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="${landuse.landLegal}">
                                        </td>
                                        <td>
                                            <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="${landuse.landServiceCondition}">
                                        </td>
                                        <td>
                                            <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="${landuse.landArea}">
                                        </td>
                                        <td>
                                            <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="${landuse.landUseTerm}">
                                        </td>
                                        <c:if test="${landuse.isPledge ==1}">
                                        <td>
                                            <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="有" >
                                        </td>
                                        </c:if>
                                        <c:if test="${landuse.isPledge ==0}">
                                            <td>
                                                <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="无" >
                                            </td>
                                        </c:if>
                                        <c:if test="${landuse.isRent == 1}">
                                        <td>
                                            <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value='有'  >
                                        </td>
                                        </c:if>
                                        <c:if test="${landuse.isRent == 0}">
                                            <td>
                                                <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value='无'  >
                                            </td>
                                        </c:if>
                                        <td>
                                            <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="${landuse.landRemark}">
                                        </td>
                                    </tr>
                                    </c:forEach>
                                    <tr align="right">
                                        <td colspan="12">
                                            <div>
                                                <button class="layui-btn">
                                                    <i class="layui-icon"></i></button></div>
                                        </td>

                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="8" style="font-size: 16px;font-weight: bold;">
                                (二) 房屋所有权证
                            </td>
                        </tr>
                        <tr>
                            <td>

                            </td>
                            <td>
                                <table>
                                    <tr align="center">
                                        <td>
                                            序号
                                        </td>
                                        <td>
                                            权利人
                                        </td>
                                        <td>
                                            取得方式（自建/购买/租赁）
                                        </td>
                                        <td>
                                            房产证证号 
                                        </td>
                                        <td>
                                            地址
                                        </td>
                                        <td>
                                            面积(m2)
                                        </td>
                                        <td>
                                            有无抵押
                                        </td>
                                        <td>
                                            是否被冻结查封 
                                        </td>
                                        <td>
                                            备注
                                        </td>
                                    </tr>
                                    <c:forEach items="${houseOwner}" var="houseuwner" varStatus="vs">
                                    <tr align="center">
                                        <td>
                                            ${vs.count}
                                        </td>
                                        <td>
                                            <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="${houseuwner.houseObligee}">
                                        </td>
                                        <c:if test="${houseuwner.houseMethod == 1}">
                                        <td>
                                            <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="自建">
                                        </td>
                                        </c:if>
                                        <c:if test="${houseuwner.houseMethod == 2}">
                                            <td>
                                                <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="购买">
                                            </td>
                                        </c:if>
                                        <c:if test="${houseuwner.houseMethod == 3}">
                                            <td>
                                                <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="租赁">
                                            </td>
                                        </c:if>
                                        <td>
                                            <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="${houseuwner.houseNumber}">
                                        </td>

                                        <td>
                                            <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="${houseuwner.houseLocation}">
                                        </td>

                                        <td>
                                            <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="${houseuwner.houseArea}">
                                        </td>
                                        <c:if test="${houseuwner.isPledge == 1}">
                                        <td>
                                            <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="有">
                                        </td>
                                        </c:if>
                                        <c:if test="${houseuwner.isPledge == 0}">
                                            <td>
                                                <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="无">
                                            </td>
                                        </c:if>
                                        <c:if test="${houseuwner.isFreeze == 1}">
                                        <td>
                                            <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="是">
                                        </td>
                                        </c:if>
                                        <c:if test="${houseuwner.isFreeze == 0}">
                                            <td>
                                                <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="否">
                                            </td>
                                        </c:if>
                                        <td>
                                            <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="${houseuwner.houseRemark}">
                                        </td>
                                    </tr>
                                    </c:forEach>
                                    <tr align="right">
                                        <td colspan="9">
                                            <div>
                                                <button class="layui-btn">
                                                    <i class="layui-icon"></i></button></div>
                                        </td>
                                    </tr>
                                </table>
                            </td>

                        </tr>
                        <tr>
                            <td colspan="8" style="font-size: 16px;font-weight: bold;">
                                (三)在建工程
                            </td>
                        </tr>
                        <tr align="center">
                            <td>

                            </td>
                            <td  colspan="7">
                                <table>
                                    <tr align="center">
                                        <td   rowspan="2">
                                            序号
                                        </td>
                                        <td   rowspan="2">
                                            工程名称
                                        </td>
                                        <td   rowspan="2">
                                            发包方
                                        </td>
                                        <td   rowspan="2">
                                            承包方
                                        </td>
                                        <td >
                                            建设用地
                                        </td>
                                        <td>
                                            建设用地规划
                                        </td>
                                        <td>
                                            建设工程规划
                                        </td>
                                        <td   rowspan="2">
                                            施工许可证证号
                                        </td>
                                        <td   rowspan="2">
                                            建设工期
                                        </td>
                                        <td>
                                            是否通过
                                        </td>
                                        <td   rowspan="2">
                                            备注
                                        </td>
                                    </tr>
                                    <tr align="center">
                                        <td>
                                            土地证号
                                        </td>
                                        <td>
                                            许可证证号 
                                        </td>
                                        <td>
                                            许可证证号 
                                        </td>

                                        <td>
                                            竣工验收
                                        </td>

                                    </tr>
                                    <c:forEach items="${Construction}" var="construction" varStatus="vs">
                                    <tr align="center">
                                        <td>
                                            ${vs.count}
                                        </td>
                                        <td>
                                            <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="${construction.proName}">
                                        </td>
                                        <td>
                                            <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="${construction.proOutsourcer}">
                                        </td>
                                        <td>
                                            <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="${construction.proContractor}">
                                        </td>

                                        <td>
                                            <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="${construction.constructLandCardNum}">
                                        </td>

                                        <td>
                                            <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="${construction.constructLandLicenseNumber}">
                                        </td>
                                        <td>
                                            <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="${construction.constructProjectLicenseNum}">
                                        </td>
                                        <td>
                                            <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="${construction.constructLicenseNum}">
                                        </td>
                                        <td>
                                            <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="${construction.constructPeriod}">
                                        </td>
                                        <c:if test="${construction.isAcceptance == 1}">
                                        <td>
                                            <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="通过">
                                        </td>
                                        </c:if>
                                        <c:if test="${construction.isAcceptance == 0}">
                                            <td>
                                                <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="未通过">
                                            </td>
                                        </c:if>
                                        <td>
                                            <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="${construction.engineeringRemark}">
                                        </td>
                                    </tr>
                                    </c:forEach>
                                    <tr align="right">
                                        <td colspan="11">
                                            <div>
                                                <button class="layui-btn">
                                                    <i class="layui-icon"></i></button></div>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="8" style="font-size: 16px;font-weight: bold;">
                                (四)主要生产设备
                            </td>
                        </tr>
                        <tr>
                            <td></td>
                            <td  colspan="7">
                                <table>
                                    <tr align="center">
                                        <td   rowspan="2">
                                            序号
                                        </td>
                                        <td   rowspan="2">
                                            权利人
                                        </td>
                                        <td   rowspan="2">
                                            购置日期
                                        </td>
                                        <td>
                                            购买价格
                                        </td>
                                        <td  rowspan="2">
                                            权属文件
                                        </td>
                                        <td  rowspan="2">
                                            是否进口
                                        </td>
                                        <td  rowspan="2">
                                            是否在保 修期内
                                        </td>
                                        <td   rowspan="2">
                                            是否已 购保险 
                                        </td>
                                        <td   rowspan="2">
                                            是否在日常运营 中可买卖
                                        </td>
                                        <td rowspan="2">
                                            是否设置了任 何担保 
                                        </td>
                                        <td   rowspan="2">
                                            备注
                                        </td>
                                    </tr>
                                    <tr align="center">
                                        <td>
                                            （人民币元） 
                                        </td>
                                    </tr>
                                    <c:forEach items="${mainEquipment}" varStatus="vs" var="equipment">
                                    <tr align="center">
                                        <td>
                                            ${vs.count}
                                        </td>
                                        <td>
                                            <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="${equipment.plantObligee}">
                                        </td>
                                        <td>
                                            <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="${equipment.plantPurchaseDate}">
                                        </td>
                                        <td>
                                            <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="${equipment.plantBuyingPrice}">
                                        </td>

                                        <td>
                                            <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="${equipment.plantOwnershipUrl}">
                                        </td>
                                        <c:if test="${equipment.isImport == 1}">
                                        <td>
                                            <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="是">
                                        </td>
                                        </c:if>
                                        <c:if test="${equipment.isImport == 0}">
                                            <td>
                                                <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="否">
                                            </td>
                                        </c:if>
                                        <c:if test="${equipment.isWarranty == 1}">
                                        <td>
                                            <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="在保">
                                        </td>
                                        </c:if>
                                        <c:if test="${equipment.isWarranty == 0}">
                                            <td>
                                                <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="过保">
                                            </td>
                                        </c:if>
                                        <c:if test="${equipment.isInsurance == 1}">
                                        <td>
                                            <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="是">
                                        </td>
                                        </c:if>
                                        <c:if test="${equipment.isInsurance == 0}">
                                            <td>
                                                <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="否">
                                            </td>
                                        </c:if>
                                        <c:if test="${equipment.isBusiness == 1}">
                                        <td>
                                            <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="是">
                                        </td>
                                        </c:if>
                                        <c:if test="${equipment.isBusiness == 0}">
                                            <td>
                                                <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="否">
                                            </td>
                                        </c:if>
                                        <c:if test="${equipment.isGuarantee == 1}">
                                        <td>
                                            <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="是">
                                        </td>
                                        </c:if>
                                        <c:if test="${equipment.isGuarantee == 0}">
                                            <td>
                                                <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="否">
                                            </td>
                                        </c:if>
                                        <td>
                                            <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="${equipment.equipmentRemark}">
                                        </td>
                                    </tr>
                                    </c:forEach>
                                    <tr align="right">
                                        <td colspan="11">
                                            <div>
                                                <button class="layui-btn">
                                                    <i class="layui-icon"></i></button></div>
                                        </td>
                                    </tr>
                                </table>
                            </td>

                        </tr>
                        <tr>
                            <td colspan="8" style="font-size: 16px;font-weight: bold;">
                                (四)主要车辆清单
                            </td>
                        </tr>
                        <tr>
                            <td></td>
                            <td  colspan="7">
                                <table>
                                    <tr align="center">
                                        <td>
                                            序号
                                        </td>
                                        <td>
                                            权利人
                                        </td>
                                        <td>
                                            取得方式
                                        </td>
                                        <td>
                                            车牌号码
                                        </td>
                                        <td>
                                            有无抵押
                                        </td>
                                        <td>
                                            是否被冻结查封
                                        </td>
                                        <td >
                                            备注
                                        </td>
                                    </tr>
                                    <c:forEach items="${mainVehicles}" var="vehicle" varStatus="vs">
                                    <tr align="center">
                                        <td>
                                            ${vs.count}
                                        </td>
                                        <td>
                                            <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="${vehicle.vehicleObligee}">
                                        </td>
                                        <td>
                                            <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="${vehicle.vehicleMethod}">
                                        </td>
                                        <td>
                                            <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="${vehicle.licensePlateNumber}">
                                        </td>
                                        <c:if test="${vehicle.isPledge == 1}">
                                        <td>
                                            <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="有">
                                        </td>
                                        </c:if>
                                        <c:if test="${vehicle.isPledge == 0}">
                                            <td>
                                                <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="无">
                                            </td>
                                        </c:if>
                                        <c:if test="${vehicle.isFreeze == 1}">
                                        <td>
                                            <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="是">
                                        </td>
                                        </c:if>
                                        <c:if test="${vehicle.isFreeze == 0}">
                                            <td>
                                                <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="否">
                                            </td>
                                        </c:if>
                                        <td>
                                            <input type="text" id="L_email" name="email" required="" lay-verify="email" autocomplete="off" class="layui-input" value="${vehicle.vehicleRemark}">
                                        </td>
                                    </tr>
                                    </c:forEach>
                                    <tr align="right">
                                        <td colspan="11">
                                            <div>
                                                <button class="layui-btn">
                                                    <i class="layui-icon"></i></button></div>
                                        </td>
                                    </tr>
                                </table>
                            </td>

                        </tr>
                        <tr align="center">
                            <td colspan="8">
                                <button class="layui-btn" lay-filter="add" lay-submit="">保存</button>
                                <button class="layui-btn" lay-filter="add" lay-submit="">提交</button>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
<script>
    layui.use(['laydate','form','upload'], function(){
        var laydate = layui.laydate;
        var  form = layui.form;
        var $ = layui.jquery;
        var upload = layui.upload;


        // 监听全选
        form.on('checkbox(checkall)', function(data){

            if(data.elem.checked){
                $('tbody input').prop('checked',true);
            }else{
                $('tbody input').prop('checked',false);
            }
            form.render('checkbox');
        });
//指定允许上传的文件类型
        upload.render({
            elem: '#test3'
            ,url: 'https://httpbin.org/post' //改成您自己的上传接口
            ,accept: 'file' //普通文件
            ,done: function(res){
                layer.msg('上传成功');
                console.log(res);
            }
        });
        //执行一个laydate实例
        laydate.render({
            elem: '#start' //指定元素
        });

        //执行一个laydate实例
        laydate.render({
            elem: '#end' //指定元素
        });


    });

    /*用户-停用*/
    function member_stop(obj,id){
        layer.confirm('确认要停用吗？',function(index){

            if($(obj).attr('title')=='启用'){

                //发异步把用户状态进行更改
                $(obj).attr('title','停用')
                $(obj).find('i').html('&#xe62f;');

                $(obj).parents("tr").find(".td-status").find('span').addClass('layui-btn-disabled').html('已停用');
                layer.msg('已停用!',{icon: 5,time:1000});

            }else{
                $(obj).attr('title','启用')
                $(obj).find('i').html('&#xe601;');

                $(obj).parents("tr").find(".td-status").find('span').removeClass('layui-btn-disabled').html('已启用');
                layer.msg('已启用!',{icon: 5,time:1000});
            }

        });
    }

    /*用户-删除*/
    function member_del(obj,id){
        layer.confirm('确认要删除吗？',function(index){
            //发异步删除数据
            $(obj).parents("tr").remove();
            layer.msg('已删除!',{icon:1,time:1000});
        });
    }



    function delAll (argument) {
        var ids = [];

        // 获取选中的id
        $('tbody input').each(function(index, el) {
            if($(this).prop('checked')){
                ids.push($(this).val())
            }
        });

        layer.confirm('确认要删除吗？'+ids.toString(),function(index){
            //捉到所有被选中的，发异步进行删除
            layer.msg('删除成功', {icon: 1});
            $(".layui-form-checked").not('.header').parents('tr').remove();
        });
    }
</script>
</html>
